import request from '@/utils/request'

// 查询基础分类管理列表
export function listCategory(query) {
  return request({
    url: '/basicInfo/manager/category/list',
    method: 'get',
    params: query
  })
}

// 查询基础分类管理详细
export function getCategory(id) {
  return request({
    url: '/basicInfo/manager/category/' + id,
    method: 'get'
  })
}

// 新增基础分类管理
export function addCategory(data) {
  return request({
    url: '/basicInfo/manager/category',
    method: 'post',
    data: data
  })
}

// 修改基础分类管理
export function updateCategory(data) {
  return request({
    url: '/basicInfo/manager/category',
    method: 'put',
    data: data
  })
}

// 删除基础分类管理
export function delCategory(id) {
  return request({
    url: '/basicInfo/manager/category/' + id,
    method: 'delete'
  })
}

// 导出基础分类管理
export function exportCategory(query) {
  return request({
    url: '/basicInfo/manager/category/export',
    method: 'get',
    params: query
  })
}


// 设施管理页面 查询基础分类列表
export function getCategoryList() {
  return request({
    url: '/basicInfo/manager/category/getCategoryList',
    method: 'get'
  })
}

// 获取表头信息
export function getTableHead(query) {
  return request({
    url: '/basicInfo/manager/category/getTableHead/' + query,
    method: 'get',
  })
}

// 获取分类信息列表
export function getFacilitiesData(data, query) {
  return request({
    url: '/basicInfo/manager/category/getFacilitiesData/' + data,
    method: 'post',
    params: query
  })
}

// 新增

export function insertColumn(query) {
  return request({
    url: '/basicInfo/manager/category/insertColumn',
    method: 'post',
    data: query
  })
}
// 修改信息
export function updateColumn(data) {
  return request({
    url: '/basicInfo/manager/category/updateColumn',
    method: 'post',
    data: data
  })
}

// 删除信息
export function deleteColumn(data) {
  return request({
    url: '/basicInfo/manager/category/deleteColumn',
    method: 'post',
    data: data
  })
}
